﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class ModuleProductInfoConfig : EntityTypeConfiguration<ModuleProductInfo>
    {
        public ModuleProductInfoConfig()
        {
            ToTable("Himall_ModuleProducts");
            HasRequired(x => x.TopicModuleInfo).WithMany(x => x.ModuleProductInfo).HasForeignKey(x => x.ModuleId);
            HasRequired(x => x.ProductInfo).WithMany(x => x.Himall_ModuleProducts).HasForeignKey(x => x.ProductId);
        }
    }
}
